<?php 
header("Content-Type:text/html;charset=utf-8");
include 'includes/init.php';
include_once 'includes/upload.class.php';

session_start();

$id=isset($_SESSION['id'])?$_SESSION['id']:'';
$nphone = isset($_SESSION['phone']) ? $_SESSION['phone'] : '';
$uesrname = isset($_SESSION['uesrname']) ? $_SESSION['uesrname'] : '';

if ($_SESSION['rule_id'] == 5){
    $sql ="select distinct e.project, m.names,e.createtime,e.code from t_examine as e , t_member as m where (e.mid = m.id and e.auditing = 1) or (e.auditing = 2 and e.mid = m.id) group by e.code";
    $infoAll = $db_Obj->getall($sql);
} else {
// 查出所有待审批的信息
    $sql = "select distinct e.project, m.names,e.createtime,e.code from t_examine as e , t_member as m where (m.id = '" . $id . "' and  e.mid = m.id and e.auditing = 1) or (m.id = '" . $id . "' and  e.auditing = 2 and e.mid = m.id) group by e.code";
// echo $sql;
    $infoAll = $db_Obj->getall($sql);
}

include 'process.html';
?>